<?php
error_reporting(E_ALL);
header('Content-type: text/html');
include_once 'mysqldb/MySqlHelper.php';
$pageNo=1;
$pageSize=15;

if(isset($_POST['pageNo'])){
	if(is_numeric($_POST['pageNo'])){
		$pageNo=$_POST['pageNo'];
	}
}
if(isset($_POST['pageSize'])){
	if(is_numeric($_POST['pageSize'])){
		$pageSize=$_POST['pageSize'];
	}
}
$MySqlHelper = new MySqlHelper();
//$rows = $MySqlHelper->GetRows('select ID,NavName,NavigateUrl,PID from NavTree where Status = 1 and PID = '.$_GET['pid'].' limit '.($pageNo-1)*$pageSize.','.$pageNo*$pageSize.'');


$rows = $MySqlHelper->GetRows('select ID,Title,ModTime from Content where Status = 1 and NavID = '.$_POST['nid'].' limit '.($pageNo-1)*$pageSize.','.$pageNo*$pageSize);
while ($row = $rows->fetch_assoc()){
    echo '<dl>';
    echo '<dt><a href="content.php?id='.$row['ID'].'&pid='.$_POST['pid'].'&nid='.$_POST['nid'].'">'.$row['Title'].'</a></dt>';
    echo '<dd>'.$row['ModTime'].'</dd>';
    echo '</dl>';
}
